package cn.zz.comm.types.tuple;

/**
 * @author zhongq
 * @since 2022/3/19
 */
public class TupleTwo<T1, T2> {

	private final T1 t1;
	private final T2 t2;

	public TupleTwo(T1 t1, T2 t2) {
		this.t1 = t1;
		this.t2 = t2;
	}

	public static <T1, T2> TupleTwo<T1, T2> of(T1 t1, T2 t2) {
		return new TupleTwo<>(t1, t2);
	}

	public T1 getT1() {
		return t1;
	}

	public T2 getT2() {
		return t2;
	}

	@Override
	public String toString() {
		return "TupleTwo{" +
				"t1=" + t1 +
				", t2=" + t2 +
				'}';
	}
}